
#ifndef _CLOVE_ENCODER_H_
#define _CLOVE_ENCODER_H_
#include <ESP32Encoder.h> // 
#include "pins_arduino.h" // the CLK and DT in the pins list 
#include <Adafruit_PCF8574.h>
extern Adafruit_PCF8574 pcf;


#define CLK 13 // CLK ENCODER
#define DT 12  // DT ENCODER


class Clove_Encoder {
   private:
   static unsigned long update_time;
   static unsigned long updateK_time;
   static int64_t prev_position;
   bool button_K = false;


   public:
    void begin();
    signed short int getEncoderValue();
    bool getButtonStatus();

};

#endif
